#ifndef UUID_3642022AF7764FE05E8F1ABF07D8F336
#define UUID_3642022AF7764FE05E8F1ABF07D8F336

#include "box2d.hpp"

#include "../luautil/luautil.hpp"

#include "world.hpp"
#include "body.hpp"

#define LUAF(name) extern "C" int luabox2d_##name(lua_State* L)
#define LUAN(name) {#name, luabox2d_##name}
#define LUAN2(name1, name2) {#name1, luabox2d_##name2}

LUAF(create_world);
LUAF(clone_world);
LUAF(create_body);
LUAF(world_step);
LUAF(world_destroy);

LUAF(body_add_circle);
LUAF(body_pos);
LUAF(body_orientation);

extern int box2d_core_world_tag;

inline LuaWorld& check_world(lua_State* L, int idx)
{
	return check_object<LuaWorld>(L, idx, &box2d_core_world_tag, "expected world");
}


#endif // UUID_3642022AF7764FE05E8F1ABF07D8F336
